<?php 
session_start();
// 获取登录的id
$uid = $_SESSION['uid'];
if(isset($uid)){
    // logined
    $conn = mysqli_connect('127.0.0.1','root','123456','super','3306');
// 2.设置查询编码 ***重要
   mysqli_query($conn,'SET NAMES UTF8');
   // 查询id为1的项目
  // $sql = "SELECT p.p_name,p.id FROM project_user as pu left join project as p on pu.pid=p.id WHERE pu.uid=$uid";
   //$result = mysqli_query($conn,$sql);
   //$data = [];
  // while ($d = mysqli_fetch_array($result)) {
      // array_push($data, $d);
   //}

}else{
    header('location:login.php');
}



 ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>myself</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/myself.css">
    <script src="../js/jquery-3.1.1.js"></script>
    <script src="../js/common.js"></script>
    <script src="../js/myself.js"></script>

</head>
<body>
    <div>
        <header></header>

        <div class="content">
            <div id="brief">
                <table>
                    <tr>
                        <td rowspan="3"><img src="../images/photo.jpg" alt=""></td>
                        <!--死数据-->
                        <td id="name">123</td>
                    </tr>
                    <tr>
                        <!--死数据-->
                        <td id="maile">123123123@163.com</td>
                    </tr>
                    <tr>
                        <!--死数据-->
                        <td id="remark">
                            <span>添加成员备注</span>
                            <div id="notes"><img src="../images/note.png" alt=""></div>
                        </td>
                        <td id="bianji">
                            <input type="text" placeholder="添加成员备注">
                            <button>保存</button>
                            <span>取消</span>
                        </td>
                    </tr>
                </table>
            </div>

            <div class="line">
                <ul id="list">
                    <li class="listone">任务</li>
                    <li>关注</li>
                    <li>日程</li>
                    <li>周报</li>
                </ul>
            </div>

            <!--任务-->
            <div class="page" id="ps">
                <p class="pone">
                    <span><img src="../images/new.png" alt=""></span>
                    <span>新任务</span>
                </p>
                <p class="ptow">当前没有任务</p>

                <p class="pone">
                    <span><img src="../images/today.png" alt=""></span>
                    <span>今天</span>
                </p>
                <p class="ptow">今天任务轻放入这里</p>

                <p class="pone">
                    <span><img src="../images/next.png" alt=""></span>
                    <span>接下来</span>
                </p>
                <p class="ptow">已确定任务请放这里</p>

                <p class="pone">
                    <span><img src="../images/box.png" alt=""></span>
                    <span>以后</span>
                </p>
                <p class="ptow">待考虑的任务请放入这里</p>

                <p class="plast">
                    <span>查看已完成任务</span>
                    <span>查看添加的任务</span>
                </p>
            </div>

            <!--关注-->

                <div class="page" id="concern">
                    <p>
                        <img src="../images/start.png" alt="">
                        <span><span>123</span> 没有关注的内容哦</span>
                    </p>
                </div>

            <!--日程-->

                <div class="page" id="schedule">
                    <button>创建日程</button>
                    <p>
                        <img src="../images/rili.png" alt="">
                        <span>还没有日程安排</span>
                    </p>
                </div>

            <!--周报-->
            <div class="page" id="weekly">
                <p>本周周报</p>
                <p><span>写周报</span></p>
            </div>

        </div>


        <div id="ncontent">
            <div id="nav">123</div>
            <div id="creat">
                <h2>创建日程</h2>
                <input type="text" placeholder="在这里输入日程内容">
                <p id="type">
                    <span>类型</span>
                    <input type="checkbox" checked>全天事件
                </p>
                <p class="settime">
                    <span>开始</span>
                    <input type="text" value="2016-12-29">
                </p>
                <p class="settime">
                    <span>结束</span>
                    <input type="text" value="2016-12-29">
                </p>
                <p class="settime">
                    <span>地点</span>
                    <input type="text">
                </p>

                <p id="handle">
                    <span><a href="#">添加</a></span>
                    <span>取消</span>
                </p>
            </div>
        </div>
        
    </div>

    <script>
        window.onload = function () {
            var lis = document.getElementById('list').children;
            var page = document.getElementsByClassName('page');
            for(var i = 0;i < lis.length;i++){
                lis[i].index = i;
                lis[i].onclick = function () {
                    for(var j = 0;j < page.length;j++){
                        page[j].style.display = "none";
                        lis[j].className = '';
                    }
                    this.className = 'listone';
                    page[this.index].style.display = 'block';
                }
            }
        }
    </script>
</body>
</html>